<template>
  <div>
    <el-table
        :data="tableData"
        :span-method="objectSpanMethod"
        border
        style="width: 100%; margin-top: 20px">
      <el-table-column
          prop="name"
          label="市"
          width="180">
      </el-table-column>
      <el-table-column
          prop="hightmpdays"
          label="高温(>40摄氏度)最长持续时间（天）">
      </el-table-column>
      <el-table-column
          prop="maxhightmp"
          label="最高温（摄氏度）">
      </el-table-column>
      <el-table-column
          prop="maxhightmpdate"
          label="最高温出现日期">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: []
    };
  },
  created() {
    this.get();
  },
  methods: {
    get(){
      this.axios.get("/weather1").then(res => {
        console.log(res.data)
        this.tableData=res.data
      })
    }
  }
};
</script>
